﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace KD.Sms.UI_Sys
{
    public partial class frmSysLog : Form
    {
        public frmSysLog()
        {
            InitializeComponent();
        }

        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            if (e.Tool.Key == "Query")
            {
                gridMain.DataSource = DAL.SqlLite.Main.Instance.DoQuerySysLog(dtBegin.Value.ToString("yyyy-MM-dd HH:mm:ss"), dtEnd.Value.ToString("yyyy-MM-dd HH:mm:ss"), txtContent.Text.Trim());
            }
        }

        private void frmSysLog_Load(object sender, EventArgs e)
        {
            dtBegin.Value = Convert.ToDateTime(DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd") + " 00:00:00");
            dtEnd.Value = DateTime.Now.AddSeconds(5);
        }
    }
}
